'use strict';

module.exports = (app, conf) => {
    // 解构模型名称 定义相互关系
    const {
        Department, UserToken, User
    } = app.fs.dc.models;


    User.belongsTo(Department, { foreignKey: 'roleId', targetKey: 'id' });
    Department.hasMany(User, { foreignKey: 'roleId', sourceKey: 'id' });
}